package com.woniuxy.api;

import com.woniu.cloud.common.dto.Result;
import com.woniuxy.form.GetAfterSaleByPlatform;
import com.woniuxy.form.GetOrder;
import com.woniuxy.form.InsertStorePurchaseOrder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "kaer-order",contextId = "StorePurchaseOrderApi")
public interface StorePurchaseOrderApi {

    /**
     *
     * @param insertStorePurchaseOrder
     * @return
     *
     * 增加店铺进货订单表
     *
     */
    @PostMapping("/insertStorePurchaseOrder")
    Result insertStorePurchaseOrder(@RequestBody InsertStorePurchaseOrder insertStorePurchaseOrder);

    /**
     *
     * @param getAfterSaleByPlatform
     * @return
     *
     * 店铺查看该店铺的进货订单表
     */
    @GetMapping("/getStorePurchaseOrderByStoreId")
    Result getStorePurchaseOrderByStoreId(@RequestBody GetAfterSaleByPlatform getAfterSaleByPlatform);

    /**
     *
     * @param getAfterSaleByPlatform
     * @return
     * 平台分页查看所有的 进货订单表
     */
    @GetMapping("/getStorePurchaseOrderByPlatform")
    Result getStorePurchaseOrderByPlatform(@RequestBody GetAfterSaleByPlatform getAfterSaleByPlatform);

    /**
     *
     * @param storePurchaseOrderId
     * @param status
     * @return
     *
     * 平台修改进货商品订单的订单状态
     */
    @PutMapping("/updateStorePurchaseOrderByPlatform")
    Result updateStorePurchaseOrderByPlatform(@RequestParam("storePurchaseOrderId") Integer storePurchaseOrderId,@RequestParam("status") Integer status);

    @GetMapping("/getStorePurchaseOrderById")
    Result getStorePurchaseOrderById(@RequestParam("id") Integer id);
}
